<?php 
global $_GPC, $_W;
$cfg = $this->module['config'];
$operation = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
if ($operation == 'login') {
	$pwd=trim($_GPC['password']);
	if(!$pwd)die(json_encode(array("success"=>false,"msg"=>"密码错误")));
	$item=pdo_fetch("SELECT * FROM ".tablename('j_hmoney_user')." WHERE weid='{$_W['uniacid']}' and spassword=:b limit 1",array(":b"=>$pwd));
	if(!$item)die(json_encode(array("success"=>false,"msg"=>"用户不存在或者密码错误")));
	if(!$item['status'])die(json_encode(array("success"=>false,"msg"=>"该用户还没有审核，请联系管理员")));
	isetcookie('juserid', $item['id']);
	isetcookie('shopid', $item['pcate']);
	isetcookie('shortpass', $pwd);
	die(json_encode(array("success"=>true)));
	
}elseif ($operation == 'sendmessage') {
	
}
